package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.bo.WxFootDeleteBo;
import com.cskaoyan.bean.bo.WxFootprintListBo;
import com.cskaoyan.bean.pojo.MallUser;
import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.bean.vo.WxFootPrintVo;
import com.cskaoyan.bean.vo.WxFootPrintVo1;
import com.cskaoyan.service.WxFootPrintService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description:微信小程序的足迹
 * @Author: chaohe@com.cskaoyan
 * @Date: 2021/7/12
 * @Time: 14:11
 */
@RestController
@RequestMapping("wx/footprint")
public class WxFootPrintController {

    @Autowired
    WxFootPrintService wxFootPrintService;
    /**
     * @Author chaohe
     * @description: 足迹刷新
     * @Date 17:49 2021/7/12
     * url:   http://localhost:8083/wx/footprint/list
     */

    @RequestMapping("list")
    public BaseRespVo list(WxFootprintListBo wxFootprintListBo) {

        WxFootPrintVo wxFootPrintVo = wxFootPrintService.list(wxFootprintListBo);

        return BaseRespVo.ok(wxFootPrintVo);

    }
    /**
     * @Author chaohe
     * @description: 足迹删除
     * @Date 17:49 2021/7/12
     * url: http://localhost:8083/wx/footprint/delete
     */

    @RequestMapping("delete")
    public BaseRespVo delete(@RequestBody WxFootDeleteBo wxFootDeleteBo) {

        wxFootPrintService.delete(wxFootDeleteBo);
        return BaseRespVo.ok();
    }

}
